<?php
$connect = new MongoClient();
$db = $connect->selectDB('test');
$connection = $db->selectCollection('users');
//$cursor = $connection->find();
//foreach ($cursor as $document) {
//    foreach ($document as $key=>$value) {//注意 这里的$value不一定是一个字符串 so....
//        echo $key .'=>' . $value . "\t";
//    }
//    echo "\n";
//}
//查询条件 大部分和shell操作一样
$cursor = $connection->find(['i' => [
    '$gt' => 95
]]);
while ($cursor->hasNext()) {
    var_dump($cursor->getNext());
}